
export enum EditorInputEvent {
    SET_CONTENT = 'setContent',
    SET_BASE_PATH = 'setBasePath',
    LOG = 'log',
    NEW_DOC = 'newDoc',
    NEW_FILE = 'newFile',
    COMPILE_CODE = 'compileCode',
    NODE_SELECTOR = 'nodeSelector',
}
export enum EditorOutputEvent {
    SAVE_FILE = 'saveFile',
    OPEN_FILE = 'openFile',
    UPDATE_FILE = 'updateFile',
    COMPILE_CODE = 'compileCode',
    EXECUTE_CODE = 'executeCode',
    STOP_VM = 'stopVm',
    LOG = 'log',
    ENV_INFO = 'envInfo',
    EDITOR_READY = 'editorReady',
}

export function getNonce() {
	let text = '';
	const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
	for (let i = 0; i < 32; i++) {
		text += possible.charAt(Math.floor(Math.random() * possible.length));
	}
	return text;
}
